<template>
	<div class="module">
		<div style="text-align: center;">
			<i class="el-icon-data-line" style="font-size: 20px;"></i>
			<h5 style="margin: 0 10px;">数据样例</h5>
		</div>

		<JsonEditor mode="code" lang="zh" v-model="req.data" copyable :expand-depth="100" @json-change="jsonChange">
		</JsonEditor>

	</div>
</template>

<script>
	import JsonEditor from 'vue-json-editor'

	export default {
		name: '',
		components: {
			JsonEditor
		},
		props: {
			req: {
				type: Object
			}
		},
		model: ['req'],
		data() {
			return {

			}
		},
		filters: {

		},
		methods: {
			jsonChange(val) {
				return 
			},
			setD(){
				let keys = Object.keys(this.req.data)
				let d = {}
				for (let key of keys) d[key] = this.req.describe[key]
				this.req.describe = d
			}
		},
		watch:{

		},
		created() {
			this.setD()
		}
	}
</script>

<style scoped="">
	.module {
		width: 400px;
	}
</style>
